package com.ywgt.pojo;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.ywgt.mybatisHandler.JsonStringArrayTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.ArrayTypeHandler;
import org.apache.ibatis.type.JdbcType;

/**
 * <p>
 * 商品基本信息表
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "dts_goods",autoResultMap = true)
@ApiModel(value="Goods对象", description="商品基本信息表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品编号")
    private String goodsSn;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品所属类目ID")
    private Integer categoryId;

    private Integer brandId;
    @TableField(value = "gallery",typeHandler = JsonStringArrayTypeHandler.class,jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "商品宣传图片列表，采用JSON数组格式")
    private String[] gallery;

    @ApiModelProperty(value = "商品关键字，采用逗号间隔")
    private String keywords;

    @ApiModelProperty(value = "商品简介")
    private String brief;

    @ApiModelProperty(value = "是否上架")
    private Boolean isOnSale;

    @ApiModelProperty(value = "排序")
    @TableField(value = "sort_order")
    private Integer sortOrder;

    @ApiModelProperty(value = "商品页面商品图片")
    private String picUrl;

    @ApiModelProperty(value = "商品分享朋友圈图片")
    private String shareUrl;

    @ApiModelProperty(value = "是否新品首发，如果设置则可以在新品首发页面展示")
    private Boolean isNew;

    @ApiModelProperty(value = "是否人气推荐，如果设置则可以在人气推荐页面展示")
    private Boolean isHot;

    @ApiModelProperty(value = "商品单位，例如件、盒")
    @TableField(value = "`unit`")
    private String unit;

    @ApiModelProperty(value = "专柜价格")
    private BigDecimal counterPrice;

    @ApiModelProperty(value = "零售价格")
    private BigDecimal retailPrice;

    @ApiModelProperty(value = "商品详细介绍，是富文本格式")
    private String detail;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date addTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "浏览量")
    private Integer browse;

    @ApiModelProperty(value = "已销售总量")
    private Integer sales;

    @ApiModelProperty(value = "逻辑删除")
    private Boolean deleted;

    @ApiModelProperty(value = "供货单位")
    private String commpany;

    @ApiModelProperty(value = "批发价格")
    private BigDecimal wholesalePrice;

    @ApiModelProperty(value = "审批状态 ：4 未提交  0 待审批  1 审批通过 2 审批拒绝")
    private Integer approveStatus;

    @ApiModelProperty(value = "审批内容")
    private String approveMsg;

    @ApiModelProperty(value = "佣金类型 ： 0 无推广佣金  1 自定义佣金 2 代理审批比例")
    private Integer brokerageType;

    @ApiModelProperty(value = "推广佣金金额")
    private BigDecimal brokeragePrice;


}
